﻿using System;

public abstract class Singleton<T> where T : class, new()
{
    private static T instance = null;

    public static T Instance
    {
        get { return instance ?? (instance = new T()); }
    }

    public static bool HasInstance
    {
        get { return instance != null; }
    }
}
